package me.zhengjie.dao;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.sql.Timestamp;
import java.util.Date;


@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("iws_freeze")
public class FreezeDao {
    @ApiModelProperty(value = "主鍵id")
    @TableField("id")
    private String id;

    @ApiModelProperty(value = "冻结单号")
    @TableField("task_id")
    private String taskId;

    @ApiModelProperty(value = "仓库号")
    @TableField("floor")
    private String floor;

    @ApiModelProperty(value = "任务起点储位")
    @TableField("task_start")
    private String taskStart;

    @ApiModelProperty(value = "任务终点储位")
    @TableField("task_end")
    private String taskEnd;

    @ApiModelProperty(value = "载具码")
    @TableField("container_code")
    private String containerCode;

    @ApiModelProperty(value = "载具状态")
    @TableField("container_status")
    private Integer containerStatus;

    @ApiModelProperty(value = "工位ip")
    private String workIp;

    @ApiModelProperty(value = "货架类型")
    private String goodType;

    @ApiModelProperty(value = "任务状态")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "冻结时间")
    @TableField("freeze_time")
    private Timestamp freezeTime;

    @ApiModelProperty(value = "冻结账号")
    @TableField("freeze_name")
    private String freezeName;

    @ApiModelProperty(value = "冻结描述")
    @TableField("freeze_des")
    private String freezeDes;

    @ApiModelProperty(value = "冻结信息")
    @TableField("freeze_notes")
    private String freezeNotes;

    public void copy(MaterialDao source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
